package com.littlec.sdk.entity.messagebody;

import java.io.File;

import android.os.Parcel;

public class LocationMessageBody extends FileMessageBody {
	private String address;
	private double latitude;
	private double longitude;
	private int width;
	private int height;

	public LocationMessageBody(double latitude, double longitude,
			String address, File file) {
		this.address = address;
		this.latitude = latitude;
		this.longitude = longitude;
		if (file != null) {
			this.localPath = file.getAbsolutePath();
			this.fileName = file.getName();
			this.fileLength = file.length();
		}
	}

	public String getAddress() {
		return this.address;
	}

	public double getLatitude() {
		return this.latitude;
	}

	public double getLongitude() {
		return this.longitude;
	}

	public int getWidth() {
		return this.width;
	}

	public void setWidth(int width) {
		this.width = width;
	}

	public int getHeight() {
		return this.height;
	}

	public void setHeight(int height) {
		this.height = height;
	}

	public String toString() {
		return "location:" + this.address + ",lat:" + this.latitude + ",lng:"
				+ this.longitude + ",ScreenShotUrl:" + this.originalUri;
	}

	public int describeContents() {
		return 0;
	}

	public void writeToParcel(Parcel dest, int flags) {
	}

	public String getContent() {
		return getLocalPath();
	}
}
